<?php

namespace App\Models\Goods;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Spec extends Model
{
    use HasFactory;
    public $table='spec';
    protected $guarded = [];

    /**
     * 规格值查询规格值
     * 一个规格名对应多个规格值
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function SpecValue(){
        return $this->hasMany(SpecValue::class,'spec_id','id');
    }
}
